package protocol.common.entity;

public class HttpConnConfig {
	private String channle;
	private String dataConnection;
	private String sendCacheKey;
	private String reportCacheKey;
	private HttpParametersConfig listenerConfig;
	private HttpParametersConfig deliverConfig;
	private HttpParametersConfig reportConfig;
	private HttpParametersConfig sendConfig;

	
	public String getSendCacheKey() {
		return sendCacheKey;
	}

	public void setSendCacheKey(String sendCacheKey) {
		this.sendCacheKey = sendCacheKey;
	}

	public String getReportCacheKey() {
		return reportCacheKey;
	}

	public void setReportCacheKey(String reportCacheKey) {
		this.reportCacheKey = reportCacheKey;
	}

	public String getChannle() {
		return channle;
	}

	public void setChannle(String channle) {
		this.channle = channle;
	}
	
	public String getDataConnection() {
		return dataConnection;
	}

	public void setDataConnection(String dataConnection) {
		this.dataConnection = dataConnection;
	}

	public HttpParametersConfig getParametersConfig(ParametersType parametersType){
		HttpParametersConfig returnConfig = null;
		switch (parametersType) {
			case DELIVER:
				returnConfig = this.deliverConfig;
				break;
			case LISTENER:
				returnConfig = this.listenerConfig;
				break;
			case REPORT:
				returnConfig = this.reportConfig;
				break;
			case SEND:
				returnConfig = this.sendConfig;
				break;
		}
		return returnConfig;
	}
	
	public void setParametersConfig(ParametersType parametersType,HttpParametersConfig parametersConfig){
		switch (parametersType) {
			case DELIVER:
				this.deliverConfig = parametersConfig;
				break;
			case LISTENER:
				this.listenerConfig = parametersConfig;
				break;
			case REPORT:
				this.reportConfig = parametersConfig;
				break;
			case SEND:
				this.sendConfig = parametersConfig;
				break;
		}
	}
	

}
